package cn.edu.gduf.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Setter
@Getter
@Document("question_comment")
public class QuestionComment {
    public static final int QUESTION_COMMENT_TYPE_COMMENT = 0; //普通评论
    public static final int QUESTION_COMMENT_TYPE = 1; //评论的评论
    @Id
    private String id;  //id
    private Long questionId;  //问答id
    private String questionTitle; //问答标题

    private Long userId;    //用户id
    private String username; //用户名
    private String city;
    private int level;
    private String headUrl;   // 用户头像

    private int type = QUESTION_COMMENT_TYPE_COMMENT; //评论类别

    private Date createTime; //创建时间
    private String content;  //评论内容

    private QuestionComment refComment;  //关联的评论
}
